﻿using System;
using System.Collections.Generic;
using System.Text;

namespace HenIT.BizTalk.Objects
{
    public class IntMatch
    {
        public bool Match { get; set; }
        private int intValue;
        public int Value
        {
            get { return intValue; }
            set
            {
                intValue = value;
                Match = intValue == intValue2;
            }
        }
        private int intValue2;
        public int Value2
        {
            get { return intValue2; }
            set
            {
                intValue2 = value;
                Match = intValue == intValue2;
            }
        }

        public IntMatch(int intValue)
        {
            Value = intValue;
        }

        public override string ToString()
        {
            return Value.ToString();
        }

        #region IComparable Members
        public int CompareTo(object obj)
        {
            return CompareTo((IntMatch)obj);
        }
        public int CompareTo(IntMatch obj)
        {
            return Value.CompareTo(obj.Value);
        }
        #endregion
    }
}
